# -*- coding: utf-8 -*-
# @Time        :2025/8/1 上午11:48
# @Author      :文刀水寿
# @File        : 全局变量.py
"""
 @Description :
"""

import threading

num = 0


def task1():
    global num
    num = 100
    print(f"task1的num：-> {num}")


def task2():
    global num
    print(f"task2的num：-> {num}")


if __name__ == '__main__':
    t1 = threading.Thread(target=task1())
    t2 = threading.Thread(target=task2())
    t1.start()
    t2.start()
